﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace Tasks
{
    public class CopyTask
    {
        
        public static void Execute(string destRoot, string sourceRoot, string jQueryTheme)
        {
            destRoot = destRoot.EnsureEndsWith("\\");
            sourceRoot = sourceRoot.EnsureEndsWith("\\");

            var exclude = new string[]{
                                         ".hg", "_libs", "_old", "_ReSharper*", 
                                         "bin", "CopySourceDependencies", "obj",
                                         ".hgignore", "*.ReSharper.user", "*.sln",
                                         "*.sln", "*.suo", "_Copy", "CopySource", "jquery"
                                      };

            Utilities.CopyDirectory(sourceRoot, destRoot, exclude, null);


            Utilities.CopyDirectory(Path.Combine(sourceRoot, "content\\css\\jquery\\" + jQueryTheme),
                                    Path.Combine(destRoot, "content\\css\\jquery\\" + jQueryTheme));

        }
        
    }
}